<template>
  <div>
    <!-- 搜索导航栏 -->
    <div class="seek" v-show="shows">
      <div>
        <span>Id</span>
        <span><el-input v-model="inputh1" placeholder="搜索"></el-input></span>
      </div>
      <div>
        <span>学校名称</span>
        <span
          ><el-input v-model="inputh2" placeholder="学校名称"></el-input
        ></span>
      </div>
      <div>
        <span>省份</span>
        <span><el-input v-model="inputh3" placeholder="省份"></el-input></span>
      </div>
      <div>
        <span>城市</span>
        <span><el-input v-model="inputh4" placeholder="城市"></el-input></span>
      </div>
      <div>
        <span>区域</span>
        <span><el-input v-model="inputh5" placeholder="区域"></el-input></span>
      </div>
      <div>
        <span>联系人姓名</span>
        <span
          ><el-input v-model="inputh6" placeholder="联系人姓名"></el-input
        ></span>
      </div>
      <div>
        <span>联系人手机</span>
        <span
          ><el-input v-model="inputh7" placeholder="联系人手机"></el-input
        ></span>
      </div>
      <div>
        <span>联系人身份</span>
        <span
          ><el-input v-model="inputh8" placeholder="联系人身份"></el-input
        ></span>
      </div>
      <div>
        <span>创建班级审核</span>
        <span>
          <el-select v-model="valueh9" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </span>
      </div>
      <div>
        <span>管理员设置</span>
        <span
          ><el-input v-model="inputh10" placeholder="创建班级审核"></el-input
        ></span>
      </div>
      <div>
        <el-button
          type="success"
          @click="hunt"
          style="background-color: #18bc9c"
          >提交</el-button
        >
        <el-button>重置</el-button>
      </div>
    </div>
    <!--导航 按钮 -->
    <div class="navbtn">
      <div>
        <el-button
          style="background-color: #30364a"
          type="info"
          icon="el-icon-refresh"
          @click="refreshs"
        ></el-button>
        <el-button
          style="background-color: #18bc9c"
          type="success"
          icon="el-icon-plus"
          @click="dialogVisible = true"
          >添加</el-button
        >
        <el-button
          type="success"
          icon="el-icon-edit"
          style="background-color: #18bc9c"
          :disabled="checkss"
          @click="compile"
          >编辑</el-button
        >
        <el-button
          type="danger"
          icon="el-icon-delete"
          style="background-color: #f52713"
          @click="dialogVisibled = true"
          :disabled="checkss"
          >删除</el-button
        >
      </div>
      <div>
        <el-input v-model="input" placeholder="搜索"></el-input>
        <el-button icon="el-icon-document" @click="tabless"></el-button>
        <el-button icon="el-icon-s-grid" class="abolish" @click="checkslist">
          <!-- 选项框 -->
          <div class="opt" v-show="ckc">
            <div>
              <el-checkbox label="Id" v-model="checked[0]"></el-checkbox>
            </div>
            <div>
              <el-checkbox label="学校名称" v-model="checked[1]"></el-checkbox>
            </div>
            <div>
              <el-checkbox label="省份" v-model="checked[2]"></el-checkbox>
            </div>
            <div>
              <el-checkbox label="城市" v-model="checked[3]"></el-checkbox>
            </div>
            <div>
              <el-checkbox label="区域" v-model="checked[4]"></el-checkbox>
            </div>
            <div>
              <el-checkbox
                label="联系人姓名"
                v-model="checked[5]"
              ></el-checkbox>
            </div>
            <div>
              <el-checkbox
                label="联系人手机"
                v-model="checked[6]"
              ></el-checkbox>
            </div>
            <div>
              <el-checkbox
                label="联系人省份"
                v-model="checked[7]"
              ></el-checkbox>
            </div>
            <div>
              <el-checkbox
                label="创建班级审核"
                v-model="checked[8]"
              ></el-checkbox>
            </div>
            <div>
              <el-checkbox
                label="管理员设置"
                v-model="checked[9]"
              ></el-checkbox>
            </div>
            <div>
              <el-checkbox label="操作"></el-checkbox>
            </div>
          </div>
        </el-button>
        <el-button icon="el-icon-thumb" class="abolish abolishs" @click="dao">
          <ul class="daos" v-show="daoss">
            <li>JSON</li>
            <li>XML</li>
            <li>CSV</li>
            <li>TXT</li>
            <li>MS-Word</li>
            <li>MS-Excel</li>
          </ul>
        </el-button>
        <el-button icon="el-icon-search" @click="concealsss"></el-button>
      </div>
    </div>

    <!-- 表格 -->
    <div class="box" v-show="tabless1">
      <el-table
        ref="multipleTable"
        :data="tableData"
        tooltip-effect="dark"
        style="width: 100%"
        border
        :default-sort="{ prop: 'data', order: 'descending' }"
        @selection-change="handleSelectionChange"
      >
        <el-table-column
          type="selection"
          width="40"
          v-if="checked[0]"
        ></el-table-column>
        <el-table-column prop="id" label="Id" width="40" v-if="checked[1]">
        </el-table-column>
        <el-table-column
          prop="schoolname"
          label="学校名称"
          sortable
          width="100"
        >
        </el-table-column>
        <el-table-column
          prop="province"
          label="省份"
          sortable
          width="80"
          v-if="checked[2]"
        >
        </el-table-column>
        <el-table-column
          prop="city"
          label="城市"
          sortable
          width="80"
          v-if="checked[3]"
        >
        </el-table-column>
        <el-table-column
          prop="area"
          label="区域"
          sortable
          width="80"
          v-if="checked[4]"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="联系人姓名"
          sortable
          width="120"
          v-if="checked[5]"
        >
        </el-table-column>
        <el-table-column
          prop="phone"
          label="联系人手机"
          sortable
          width="120"
          v-if="checked[6]"
        >
        </el-table-column>
        <el-table-column
          prop="identity"
          label="联系人身份"
          sortable
          width="120"
          v-if="checked[7]"
        >
        </el-table-column>
        <el-table-column
          prop="class"
          label="创建班级审核"
          sortable
          width="130"
          v-if="checked[8]"
        >
        </el-table-column>
        <el-table-column
          label="管理员设置"
          prop="administrator"
          sortable
          width="120"
          class="chac"
          v-if="checked[9]"
        >
          <el-button class="btns" @click="dialogVisibledg = true"
            ><i class="el-icon-view"></i>查看</el-button
          >
        </el-table-column>
        <el-table-column label="操作" width="130">
          <template slot-scope="scope">
            <el-button
              style="background-color: #18bc9c"
              size="mini"
              type="success"
              icon="el-icon-edit"
              @click="compile(scope.row.id)"
            ></el-button>
            <el-button
              style="background-color: #f75444"
              size="mini"
              type="danger"
              icon="el-icon-delete"
              @click="dialogVisibled = true"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <!-- 切换表格 -->
    <ul
      class="textalignment"
      v-show="tabless2"
      v-for="i in tableDatas"
      :key="i.id"
    >
      <li>
        <input type="checkbox" />
      </li>
      <li>
        <div>Id</div>
        <div>{{ i.id }}</div>
      </li>
      <li>
        <div>学校名称</div>
        <div>{{ i.schoolname }}</div>
      </li>
      <li>
        <div>省份</div>
        <div>{{ i.province }}</div>
      </li>
      <li>
        <div>城市</div>
        <div>{{ i.city }}</div>
      </li>
      <li>
        <div>区域</div>
        <div>{{ i.area }}</div>
      </li>
      <li>
        <div>联系人姓名</div>
        <div>{{ i.name }}</div>
      </li>
      <li>
        <div>联系人手机</div>
        <div>{{ i.phone }}</div>
      </li>
      <li>
        <div>联系人身份</div>
        <div>{{ i.identity }}</div>
      </li>
      <li>
        <div>创建班级审核</div>
        <div>{{ i.class }}</div>
      </li>
      <li>
        <div>管理员设置</div>
        <div>{{ i.administrator }}</div>
      </li>
      <li>
        <div>操作</div>
        <div>
          <el-button
            type="success"
            icon="el-icon-edit"
            @click="compile(i.id)"
            style="background-color: #18bc9c"
          ></el-button>
          <el-button
            type="danger"
            icon="el-icon-delete"
            @click="dialogVisibled = true"
            style="background-color: #f75444"
          ></el-button>
        </div>
      </li>
    </ul>

    <!-- 添加 -->
    <div class="adds">
      <el-dialog
        title="添加"
        :visible="dialogVisible"
        :width="dialogWidth"
        :height="dialogHeight"
        @close="dialogVisible = false"
        v-drag
      >
        <span
          style="position: absolute; top: 19px; right: 50px"
          @click="toggleFullScreen"
        >
          <i class="el-icon-copy-document" style="color: #fff"></i>
        </span>
        <span style="position: absolute; top: 19px; right: 85px" @click="conceals">
          <i class="el-icon-minus" style="color: #fff"></i>
        </span>
        <!-- 添加主体内容 -->
        <div class="addcontainer">
          <div>
            <div class="names">学校名称:</div>
            <div class="sear"><el-input v-model="input1"></el-input></div>
          </div>
          <div>
            <div class="names">所在地区:</div>
            <div class="sear region">
              <el-select v-model="regionvalue" placeholder="请选择">
                <el-option
                  v-for="item in regionoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-select v-model="cityvalue" placeholder="请选择">
                <el-option
                  v-for="item in cityoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-select v-model="areavalue" placeholder="请选择">
                <el-option
                  v-for="item in areaoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">学校类型:</div>
            <div class="sear">
              <el-select v-model="values">
                <el-option
                  v-for="item in optionss"
                  :key="item.values"
                  :value="item.values"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">联系人姓名:</div>
            <div class="sear"><el-input v-model="input3"></el-input></div>
          </div>
          <div>
            <div class="names">联系人手机:</div>
            <div class="sear"><el-input v-model="input4"></el-input></div>
          </div>
          <div>
            <div class="names">联系人身份:</div>
            <div class="sear">
              <el-select v-model="valuess">
                <el-option
                  v-for="item in optionsss"
                  :key="item.valuess"
                  :value="item.valuess"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">创建班级审核:</div>
            <div class="sear">
              <el-radio v-model="radio" label="1">不需要</el-radio>
              <el-radio v-model="radio" label="2">需要</el-radio>
            </div>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button
            type="primary"
            @click="dialogVisible = false"
            style="background-color: #18bc9c"
            >确 定</el-button
          >
          <el-button @click="reset">重置</el-button>
        </span>
      </el-dialog>
    </div>

    <!-- 编辑 -->
    <div class="adds">
      <el-dialog
        title="编辑"
        :visible.sync="dialogVisibles"
        :width="dialogWidth"
        :height="dialogHeight"
        :before-close="handleClose" 
        v-drag
      >
        <span style="position: absolute; top: 19px; right: 50px"  @click="toggleFullScreen">
          <i class="el-icon-copy-document" style="color: #fff"></i>
        </span>
        <span style="position: absolute; top: 19px; right: 85px" @click="conceals1">
          <i class="el-icon-minus" style="color: #fff"></i>
        </span>
        <!-- 添加主体内容 -->
        <div class="addcontainer">
          <div>
            <div class="names">学校名称:</div>
            <div class="sear"><el-input v-model="inputb1"></el-input></div>
          </div>
          <div>
            <div class="names">所在地区:</div>
            <div class="sear region">
              <el-select v-model="regionvalueb" placeholder="请选择">
                <el-option
                  v-for="item in regionoptionsb"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-select v-model="cityvalueb" placeholder="请选择">
                <el-option
                  v-for="item in cityoptionsb"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-select v-model="areavalueb" placeholder="请选择">
                <el-option
                  v-for="item in areaoptionsb"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">学校类型:</div>
            <div class="sear">
              <el-select v-model="valuesb">
                <el-option
                  v-for="item in optionssb"
                  :key="item.valuesb"
                  :value="item.valuesb"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">联系人姓名:</div>
            <div class="sear"><el-input v-model="inputb3"></el-input></div>
          </div>
          <div>
            <div class="names">联系人手机:</div>
            <div class="sear"><el-input v-model="inputb4"></el-input></div>
          </div>
          <div>
            <div class="names">联系人身份:</div>
            <div class="sear">
              <el-select v-model="valuessb">
                <el-option
                  v-for="item in optionsssb"
                  :key="item.valuessb"
                  :value="item.valuessb"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div>
            <div class="names">创建班级审核:</div>
            <div class="sear">
              <el-radio v-model="radiob" label="1">不需要</el-radio>
              <el-radio v-model="radiob" label="2">需要</el-radio>
            </div>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button
            type="primary"
            @click="editmodify"
            style="background-color: #18bc9c"
            >确 定</el-button
          >
          <el-button @click="resetb">重置</el-button>
        </span>
      </el-dialog>
    </div>

    <!-- 删除 -->
    <div>
      <el-dialog
        title="温馨提示"
        :visible.sync="dialogVisibled"
        width="30%"
        :before-close="handleClose"
      >
        <div>确定删除此项?</div>
        <span slot="footer" class="dialog-footer">
          <el-button
            type="primary"
            @click="dialogVisibled = false"
            style="background-color: #18bc9c"
            >确 定</el-button
          >
          <el-button @click="dialogVisibled = false">取 消</el-button>
        </span>
      </el-dialog>
    </div>

    <!-- 管理员设置 -->
    <div class="adds">
      <el-dialog
        title="xxx培训机构管理员"
        :visible.sync="dialogVisibledg"
        :width="dialogWidth"
        :height="dialogHeight"
        :before-close="handleClose"
        v-drag
      >
        <span style="position: absolute; top: 19px; right: 50px" @click="toggleFullScreen">
          <i class="el-icon-copy-document" style="color: #fff"></i>
        </span>
        <span style="position: absolute; top: 19px; right: 85px" @click="conceals2">
          <i class="el-icon-minus" style="color: #fff"></i>
        </span>
        <!-- 添加主体内容 -->
        <div class="addcontainer">
          <div>
            <div class="names">用户名:</div>
            <div class="sear"><el-input v-model="inputg1"></el-input></div>
          </div>
          <div>
            <div class="names">电子邮箱:</div>
            <div class="sear"><el-input v-model="inputg2"></el-input></div>
          </div>
          <div>
            <div class="names">手机号:</div>
            <div class="sear"><el-input v-model="inputg3"></el-input></div>
          </div>
          <div>
            <div class="names">昵称:</div>
            <div class="sear"><el-input v-model="inputg4"></el-input></div>
          </div>
          <div>
            <div class="names">密码:</div>
            <div class="sear"><el-input v-model="inputg5"></el-input></div>
          </div>
          <div>
            <div class="names">登录失败次数:</div>
            <div class="sear"><el-input v-model="inputg6"></el-input></div>
          </div>
          <div>
            <div class="names">状态:</div>
            <div class="sear">
              <el-radio v-model="radiog" label="1">正常</el-radio>
              <el-radio v-model="radiog" label="2">隐藏</el-radio>
            </div>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button
            type="primary"
            @click="dialogVisible = false"
            style="background-color: #18bc9c"
            >确 定</el-button
          >
          <el-button @click="resetg">重置</el-button>
        </span>
      </el-dialog>
    </div>

    <!-- 分页 -->
    <div class="paging">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
      >
      </el-pagination>
    </div>
<<<<<<< HEAD

=======
>>>>>>> 3e3c0f4f17bc187df3f315b6eed3a2da2f99f54a
  </div>
</template>

<script>
export default {
  name: "BranchSchool",

  data() {
    return {
      input: "",
      tableData: [],
      options: [
        {
          value: "不审核",
        },
        {
          value: "审核",
        },
      ],
      value: "",

      //点击显示上层搜素
      shows:false,
      //搜索存放数组
      inputh1: "",
      inputh2: "",
      inputh3: "",
      inputh4: "",
      inputh5: "",
      inputh6: "",
      inputh7: "",
      inputh8: "",
      valueh9: "",
      inputh10: "",
      huntarr: [],
      //添加
      dialogVisible: false,
      isFullScreen: false,
      radio: "1",
      input1: "",
      input2: "",
      input3: "",
      input4: "",
      //学校类型下拉框
      optionss: [
        {
          values: "幼儿园",
        },
        {
          values: "小学",
        },
        {
          values: "中学",
        },
        {
          values: "大学",
        },
        {
          values: "教培机构",
        },
        {
          values: "其他",
        },
      ],
      values: "",
      //联系人身份下拉框
      optionsss: [
        {
          valuess: "校长",
        },
        {
          valuess: "管理人员",
        },
        {
          valuess: "老师",
        },
        {
          valuess: "其他",
        },
      ],
      valuess: "",
      //所在地区下拉框省市县
      regionoptions: [
        {
          value: "河南省",
        },
        {
          value: "广东省",
        },
      ],
      regionvalue: "",
      cityoptions: [
        {
          value: "郑州市",
        },
        {
          value: "南阳市",
        },
      ],
      cityvalue: "",
      areaoptions: [
        {
          value: "中原区",
        },
        {
          value: "方城县",
        },
      ],
      areavalue: "",

      //编辑
      dialogVisibles: false,
      radiob: "1",
      inputb1: "",
      inputb2: "",
      inputb3: "",
      inputb4: "",
      compilearr: [],
      //所在地区下拉框省市县
      regionoptionsb: [
        {
          value: "河南省",
        },
        {
          value: "广东省",
        },
      ],
      regionvalueb: "",
      cityoptionsb: [
        {
          value: "郑州市",
        },
        {
          value: "南阳市",
        },
      ],
      cityvalueb: "",
      areaoptionsb: [
        {
          value: "中原区",
        },
        {
          value: "方城县",
        },
      ],
      areavalueb: "",
      //学校类型下拉框
      optionssb: [
        {
          valuesb: "幼儿园",
        },
        {
          valuesb: "小学",
        },
        {
          valuesb: "中学",
        },
        {
          valuesb: "大学",
        },
        {
          valuesb: "教培机构",
        },
        {
          valuesb: "其他",
        },
      ],
      valuesb: "",
      //联系人身份下拉框
      optionsssb: [
        {
          valuessb: "校长",
        },
        {
          valuessb: "管理人员",
        },
        {
          valuessb: "老师",
        },
        {
          valuessb: "其他",
        },
      ],
      valuessb: "",

      //删除
      dialogVisibled: false,

      //管理员设置
      dialogVisibledg: false,
      radiog: "1",
      inputg1: "",
      inputg2: "",
      inputg3: "",
      inputg4: "",
      inputg5: "",
      inputg6: "",

      //表格来回切换
      tabless1: true,
      tabless2: false,
      tableDatas: [],
<<<<<<< HEAD

      //判断是否实现编辑和删除弹出框
      multipleSelection: [],
      checkss: true,

      //点击按钮选择显示或隐藏表格列表
      ckc: false,
      checked: [true, true, true, true, true, true, true, true, true, true],

      //下载表格
      daoss: false,
    };
  },
  computed: {
    dialogWidth() {
      return this.isFullScreen ? "100vw" : "50%"; // 或者设置为其他默认宽度
    },
    dialogHeight() {
      return this.isFullScreen ? "100vh" : "50%"; // 或者设置为其他默认高度
    },
  },
  mounted() {},
  created() {
    this.$http.school().then((res) => {
      this.tableData = res.data;
      console.log(this.tableData);
    });
  },
  methods: {
    formatter(row, column) {
      return row.address;
    },

    // 搜索
    hunt() {
      this.$http.school({ id: this.inputh1 }).then((res) => {
        this.huntarr = res.data;
        this.tableData = this.huntarr;
      });
    },

    //点击显示上层搜素
    concealsss() {
      this.shows = !this.shows;
    },
    //刷新
    refreshs() {
      location.reload();
    },
    // 添加  关闭 确定
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
    // 添加  重置
    reset() {
        (this.input1 = ""),
        (this.input2 = ""),
        (this.input3 = ""),
        (this.input4 = ""),
        (this.values = ""),
        (this.valuess = "");
    },

    //编辑
    compile(id) {
      this.dialogVisibles = true;
      this.$http.school().then((res) => {
        this.compilearr = res.data;
        for (let i = 0; i < this.compilearr.length; i++) {
          if (id == this.compilearr[i].id) {
            this.inputb1 = this.compilearr[i].schoolname;
            this.regionvalueb = this.compilearr[i].province;
            this.cityvalueb = this.compilearr[i].city;
            this.areavalueb = this.compilearr[i].area;
            this.valuesb = this.compilearr[i].sear;
            this.inputb3 = this.compilearr[i].name;
            this.inputb4 = this.compilearr[i].phone;
            this.valuessb = this.compilearr[i].identity;
            this.radiob = this.compilearr[i].administrator;
          }
        }
      });
    },
    //编辑 修改
    editmodify() {
      let arr = [
        this.inputb1,
        this.regionvalueb,
        this.cityvalueb,
        this.areavalueb,
        this.valuesb,
        this.inputb3,
        this.inputb4,
        this.valuessb,
        this.radiob,
      ];
      // console.log(arr);
    },
    // 编辑弹出框  重置
    resetb() {
        (this.inputb1 = ""),
        (this.inputb2 = ""),
        (this.inputb3 = ""),
        (this.inputb4 = ""),
        (this.valuesb = ""),
        (this.valuessb = "");
    },

    // 管理员  重置
    resetg() {
        (this.inputg1 = ""),
        (this.inputg2 = ""),
        (this.inputg3 = ""),
        (this.inputg4 = ""),
        (this.inputg5 = ""),
        (this.inputg6 = "");
    },

    //表格来回切换
    tabless() {
      this.tabless1 = !this.tabless1;
      this.tabless2 = !this.tabless2;
      this.$http.school().then((res) => {
        this.tableDatas = res.data;
      });
    },

    //点击CheckBox弹窗编辑
    handleSelectionChange(val) {
      this.multipleSelection = val;
      console.log(this.multipleSelection);
      if (this.multipleSelection.length == 0) {
        this.checkss = true;
      } else {
        this.checkss = false;
      }
    },

    //点击选项按钮选择显示或隐藏表格列表
    checkslist() {
      this.ckc = !this.ckc;
    },

    // 分页
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },

    //点击下载按钮选择显示或隐藏表格列表
    dao() {
      this.daoss = !this.daoss;
    },

    //放大
    toggleFullScreen() {
      this.isFullScreen = !this.isFullScreen;
      this.dialogVisible = true;
    },

    // 隐藏
    conceals(){
      this.dialogVisible=false
    },
     conceals1(){
      this.dialogVisibles=false
    },
=======

      //判断是否实现编辑和删除弹出框
      multipleSelection: [],
      checkss: true,

      //点击按钮选择显示或隐藏表格列表
      ckc: false,
      checked: [true, true, true, true, true, true, true, true, true, true],

      //下载表格
      daoss: false,
    };
  },
  computed: {
    dialogWidth() {
      return this.isFullScreen ? "100vw" : "50%"; // 或者设置为其他默认宽度
    },
    dialogHeight() {
      return this.isFullScreen ? "100vh" : "50%"; // 或者设置为其他默认高度
    },
  },
  mounted() {},
  created() {
    this.$http.school().then((res) => {
      this.tableData = res.data;
      console.log(this.tableData);
    });
  },
  methods: {
    formatter(row, column) {
      return row.address;
    },

    // 搜索
    hunt() {
      this.$http.school({ id: this.inputh1 }).then((res) => {
        this.huntarr = res.data;
        this.tableData = this.huntarr;
      });
    },

    //点击显示上层搜素
    concealsss() {
      this.shows = !this.shows;
    },
    //刷新
    refreshs() {
      location.reload();
    },
    // 添加  关闭 确定
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
    // 添加  重置
    reset() {
        (this.input1 = ""),
        (this.input2 = ""),
        (this.input3 = ""),
        (this.input4 = ""),
        (this.values = ""),
        (this.valuess = "");
    },

    //编辑
    compile(id) {
      this.dialogVisibles = true;
      this.$http.school().then((res) => {
        this.compilearr = res.data;
        for (let i = 0; i < this.compilearr.length; i++) {
          if (id == this.compilearr[i].id) {
            this.inputb1 = this.compilearr[i].schoolname;
            this.regionvalueb = this.compilearr[i].province;
            this.cityvalueb = this.compilearr[i].city;
            this.areavalueb = this.compilearr[i].area;
            this.valuesb = this.compilearr[i].sear;
            this.inputb3 = this.compilearr[i].name;
            this.inputb4 = this.compilearr[i].phone;
            this.valuessb = this.compilearr[i].identity;
            this.radiob = this.compilearr[i].administrator;
          }
        }
      });
    },
    //编辑 修改
    editmodify() {
      let arr = [
        this.inputb1,
        this.regionvalueb,
        this.cityvalueb,
        this.areavalueb,
        this.valuesb,
        this.inputb3,
        this.inputb4,
        this.valuessb,
        this.radiob,
      ];
      // console.log(arr);
    },
    // 编辑弹出框  重置
    resetb() {
        (this.inputb1 = ""),
        (this.inputb2 = ""),
        (this.inputb3 = ""),
        (this.inputb4 = ""),
        (this.valuesb = ""),
        (this.valuessb = "");
    },

    // 管理员  重置
    resetg() {
        (this.inputg1 = ""),
        (this.inputg2 = ""),
        (this.inputg3 = ""),
        (this.inputg4 = ""),
        (this.inputg5 = ""),
        (this.inputg6 = "");
    },

    //表格来回切换
    tabless() {
      this.tabless1 = !this.tabless1;
      this.tabless2 = !this.tabless2;
      this.$http.school().then((res) => {
        this.tableDatas = res.data;
      });
    },

    //点击CheckBox弹窗编辑
    handleSelectionChange(val) {
      this.multipleSelection = val;
      console.log(this.multipleSelection);
      if (this.multipleSelection.length == 0) {
        this.checkss = true;
      } else {
        this.checkss = false;
      }
    },

    //点击选项按钮选择显示或隐藏表格列表
    checkslist() {
      this.ckc = !this.ckc;
    },

    // 分页
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },

    //点击下载按钮选择显示或隐藏表格列表
    dao() {
      this.daoss = !this.daoss;
    },

    //放大
    toggleFullScreen() {
      this.isFullScreen = !this.isFullScreen;
      this.dialogVisible = true;
    },

    // 隐藏
    conceals(){
      this.dialogVisible=false
    },
     conceals1(){
      this.dialogVisibles=false
    },
>>>>>>> 3e3c0f4f17bc187df3f315b6eed3a2da2f99f54a
    conceals2(){
      this.dialogVisibledg=false
    },
  },
};
</script>

<style>
/* 搜索导航栏  */
.seek {
  width: 100%;
  height: 160px;
  margin-bottom: 10px;
  padding: 10px;
}
.seek > div {
  float: left;
  margin: 10px 6px;
}
.seek > div:last-child {
  margin-left: 115px;
}
.seek > div > span:first-child {
  display: inline-block;
  width: 90px;
}
.seek > div .el-input {
  width: 180px;
  height: 25px;
}

/* 导航 按钮 */
.navbtn {
  width: 100%;
  height: 60px;
  position: relative;
}
.navbtn > div:first-child {
  width: 400px;
  float: left;
}
.navbtn > div:nth-child(2) {
  width: 460px;
  float: right;
  position: relative;
}
.navbtn > div:nth-child(2) .abolish {
  margin-left: -5px;
}
.navbtn > div .el-input {
  width: 200px;
}

.navbtn .abolishs .daos {
  position: absolute;
  top: 50px;
  right: 80px;
  z-index: 1;
  width: 100px;
  background-color: #fff;
  box-shadow: 1px 1px 2px 2px #ddd;
  text-align: left;
  padding-top: 5px;
}
.navbtn .abolishs .daos li {
  margin-bottom: 10px;
  padding-left: 10px;
}
.navbtn .abolishs .daos li:hover {
  background-color: rgb(220, 232, 230);
}
/* 表格 */
.box .el-table td,
th {
  font-size: 13px;
  text-align: center;
}
<<<<<<< HEAD
/* .box tbody .el-table_1_column_11 .cell{
  width: 100px;
  height: 25px;
  background-color:rgb(24, 188, 156);
  margin-left: 10px;
  color: #fff;
} */
=======

>>>>>>> 3e3c0f4f17bc187df3f315b6eed3a2da2f99f54a

/* 切换表格 */
.textalignment {
  width: 100%;
  height: 240px;
}
.textalignment li > div {
  width: 50%;
  float: left;
}
.textalignment li > div:first-child {
  font-weight: 600;
}
.textalignment .el-button.el-button--success,
.textalignment .el-button.el-button--danger {
  width: 20px;
  height: 20px;
  padding: 0;
}
/* 添加 */
.adds .addcontainer > div {
  width: 100%;
  height: 55px;
  line-height: 55px;
  text-align: right;
}
.adds .addcontainer > div .names {
  float: left;
  width: 95px;
  margin-right: 10px;
}
.adds .addcontainer > div .sear {
  float: left;
}
.adds .addcontainer input {
  width: 300px;
}
.adds .addcontainer .region input {
  width: 98px;
}
.adds .el-dialog__header {
  background-color: #2c3e50;
}
.adds .el-dialog__title {
  color: #fff;
}
.adds .el-dialog__footer {
  background-color: #ecf0f1;
}
.adds .el-dialog__headerbtn .el-dialog__close {
  color: #fff;
}
.btns {
  background-color: rgb(24, 188, 156);
  width: 80px;
  height: 40px;
  color: white;
}
.btns i {
  margin-right: 5px;
}

/* 选项框 */
.opt {
  width: 150px;
  background-color: #fcfcfc;
  position: absolute;
  top: 70px;
  right: 116px;
  z-index: 1;
  text-align: left;
  padding: 10px;
  box-shadow: 1px 1px 2px 2px #ddd;
}
.opt div {
  margin-bottom: 5px;
}
<<<<<<< HEAD

/* 分页 */
.paging {
  width: 100%;
  height: 40px;
  padding-left: 600px;
  margin-top: 10px;
}
</style>
=======

/* 分页 */
.paging {
  width: 100%;
  height: 40px;
  padding-left: 600px;
  margin-top: 10px;
}
</style>
 

>>>>>>> 3e3c0f4f17bc187df3f315b6eed3a2da2f99f54a
